<input onchange="handle" type="file">

<script>
 function handle(e) {
   console.log(e)
 }

</script>